import request from '@/libs/request.js';

// 获取列表数据
export const getList = ({ currentPage, pageSize }, params = { a: 9 }) => {
	return request({
		url: '/Api/Project/GetList',
		method: 'get',
		params: {
			current: currentPage,
			size: pageSize,
			...params
		}
	});
};

// 添加
export const add = (row) => {
	return request({
		url: '/Api/Project/add',
		method: 'post',
		data: row
	});
};

// 删除
export const remove = (id) => {
	return request({
		url: '/Api/Project/del',
		method: 'get',
		params: {
			id
		}
	});
};

// 编辑
export const update = (row) => {
	return request({
		url: '/Api/Project/edit',
		method: 'post',
		data: row
	});
};

// 详情
export const getDetail = (id) => {
	return request({
		url: '/Api/Project/detail',
		method: 'get',
		params: {
			id
		}
	});
};
